package ku.report.service;

import java.sql.SQLException;
import java.util.List;

import ku.report.dao.EmployeesDAO;
import ku.report.dto.EmployeesDTO;
import ku.report.idao.IEmployeesDAO;

public class EmployeesService {
	private static EmployeesService employeesService;
	private IEmployeesDAO employeesManager;
	
	public static EmployeesService getInstance(){
		if(employeesService == null){
			employeesService = new EmployeesService();
		}
		return employeesService;
	}
	
	public EmployeesService(){
		employeesManager = new EmployeesDAO();
	}
	
	public EmployeesDTO empLogin(EmployeesDTO edto) {
		return employeesManager.empLogin(edto);
	}

	public List<EmployeesDTO> empList(){
		return employeesManager.empList();
	}
	
	public EmployeesDTO getMyInfo(int empno){
		return employeesManager.getMyInfo(empno);
	}
	
	public int chagePassword(EmployeesDTO dto){
		return employeesManager.changePassword(dto);
	}
}
